//index.js
//获取应用实例
var app = getApp()
Page({
  showSrc: function (event) {
    wx.showModal({
      confirmText: "复制链接",
      title: event.target.dataset.title,
      content: event.target.dataset.href,
      success: function (res) {
        if (res.confirm) {
          wx.setClipboardData({
            data: event.target.dataset.href,
            success: function (res) {
              wx.showToast({
                title: '复制成功',
              })
            }
          })
        }
      }
    });
  },
  onShareAppMessage: function (res) {
    return {
      title: 'lodsve社区',
      path: '/pages/index/index'
    }
  }
})
